<div><img src="https://mc.yandex.ru/watch/41695944" style="position:absolute; left:-9999px;" alt="" /></div> ED Forums - Показать сообщение отдельно - Changes to how instruments are exported?
Показать сообщение отдельно
Старый 30.07.2014, 20:33   #2
[FSF]Ian
ED Testers Team
 
Регистрация: 04.02.2013
Адрес: Dortmund, Germany
Сообщений: 1 102
Вес репутации: 11
[FSF]Ian - очень-очень хороший человек[FSF]Ian - очень-очень хороший человек[FSF]Ian - очень-очень хороший человек[FSF]Ian - очень-очень хороший человек[FSF]Ian - очень-очень хороший человек[FSF]Ian - очень-очень хороший человек[FSF]Ian - очень-очень хороший человек[FSF]Ian - очень-очень хороший человек[FSF]Ian - очень-очень хороший человек[FSF]Ian - очень-очень хороший человек
По умолчанию

To export additional gauges, you need to do some minor edits to their Lua files.

Let's use the RWR as an example. Open Mods/aircraft/A-10C/Cockpit/Scripts/AN_ALR69V/indicator/AN_ALR69V_init.lua and append the following lines to the end of the file:
Код:
dofile(LockOn_Options.common_script_path.."ViewportHandling.lua")
try_find_assigned_viewport("ED_A10C_RWR")
("ED_A10C_RWR" is a unique name for the viewport, which you can pick arbitrarily as long as its a valid Lua variable name.)

You can then export the RWR like this in MonitorSetup.lua:
Код:
ED_A10C_RWR =
	{
		x = 599;
		y = 1360;
		width = 179;
		height = 179;
	}
I use this approach to export the clock and the RWR.

In general, under Cockpit/Scripts there is a subfolder for each device. Inside that is an indicator subfolder which includes one Lua file that ends with _init -- that is the one you want to edit.

Edit (2015-01-19): add code to the end of the file instead of the beginning (required for some indicators, others do not care)

Крайний раз редактировалось [FSF]Ian; 19.01.2015 в 19:40.
[FSF]Ian вне форума Добавить отзыв для [FSF]Ian Пожаловаться на это сообщение   Ответить с цитированием